package com.yiyuan.app.entity.param;

import com.guaike.core.entity.annotation.ConditionBy;
import com.guaike.core.entity.annotation.IsDictValue;
import com.yiyuan.app.entity.constant.BusinessDictCodeConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
@ApiModel("预支付请求入参")
public class RepayDTO extends BaseIdDTO {

    @ApiModelProperty(value = "支付类型（1:ios，2:微信，3:支付宝）", required = true)
    @NotNull(message = "支付类型不能为空")
    @IsDictValue(code = BusinessDictCodeConstant.D_PAY_TYPE, message = "支付类型不存在")
    private Integer payType;

    @ApiModelProperty(value = "商品类型：（1:锁机、2:禁止观看、3:包机、4:连续充值、5:新手大礼包、6:活动礼包、7:充值活动、8:月卡、9:周卡）", required = true)
    @NotNull(message = "商品类型不能为空")
    @IsDictValue(code = BusinessDictCodeConstant.D_PRODUCT_TYPE, message = "商品类型不存在")
    private Integer productType;

    @ApiModelProperty(value = "设备序列号，锁机/禁止观看/包机必传")
    @ConditionBy(column = "productType", columnValue = {"1", "2", "3"}, message = "设备序列号不能为空")
    private String serialNumber;
}
